package com.nbjtjc.safe.mapper.cost;

import java.util.List;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.ResultType;
import org.apache.ibatis.annotations.Select;

import com.nbjtjc.safe.model.cost.CostBudgetPlanTemplet;
import com.nbjtjc.util.MyMapper;

@Mapper
public interface CostBudgetPlanTempletMapper extends MyMapper<CostBudgetPlanTemplet> {
//	@Select("select count(*) from cost_budget_plan_templet where parent_id = -1 and cancel = 0")
//	@ResultType(java.lang.Integer.class)
//	int countItem();
	
//	@Select("select count(*) from cost_budget_plan_templet where parent_id > 0 and cancel = 0")
//	@ResultType(java.lang.Integer.class)
//	int[] countSubItem();
//	
//	int[] findAllId();
	
	List<CostBudgetPlanTemplet> findTemplet();
	
	@Select("select * from cost_budget_plan_templet where parent_id = #{parentId}")
	List<CostBudgetPlanTemplet> findSubTemplet(@Param("parentId") int parentId);

}